package mygang.model;

import java.util.ArrayList;

/**
 * Represents custom response model
 * @author Volodymyr Lavrynovych <volodya.lavrynovych@gmail.com>
 * date: 07/08/2012
 */
public class CustomResponse {

    public static interface Result {
        public static final String SUCCESS = "Success";
        public static final String FAILURE = "Failure";
    }
    
    private String redirectUrl = null;
    private String status = null;
    private String message = null;
    private String title = null;
    private ArrayList params = new ArrayList();

    /**
     * Constructs an instance
     * @param status defines status
     * @param redirectUrl defines url for redirect
     * @param message defines response message
     * @param title defines response title
     */
    public CustomResponse(String status, String redirectUrl, String message, String title) {
        this.redirectUrl = redirectUrl;
        this.status = status;
        this.message = message;
        this.title = title;
    }
    
    /**
     * Constructs an instance
     * @param status defines status
     */
    public CustomResponse(String status) {
        this.status = status;
    }

    /**
     * Returns title
     * @return title
     */
    public String getTitle() {
        return title;
    }

    /**
     * Returns message
     * @return message
     */
    public String getMessage() {
        return message;
    }

    /**
     * Returns url for redirect
     * @return url for redirect
     */
    public String getRedirectUrl() {
        return redirectUrl;
    }

    /**
     * Returns status
     * @return status
     */
    public String getStatus() {
        return status;
    }

    /**
     * Returns list of additional variables
     * @return list of additional variables
     */
    public ArrayList getParams() {
        return params;
    }
}